import request from '@/utils/request'

const apiUrl = '/api/employee-leave'

export function saveEmployeeLeave(data) {
  return request({
    url: `${apiUrl}/save`,
    method: 'post',
    data
  })
}

export function batchSaveEmployeeLeave(data) {
  return request({
    url: `${apiUrl}/batch-save`,
    method: 'post',
    data
  })
}

export function getEmployeeLeaveList(params) {
  return request({
    url: `${apiUrl}/list`,
    method: 'get',
    params
  })
}

export function getEmployeeLeaveById(id) {
  return request({
    url: `${apiUrl}/${id}`,
    method: 'get'
  })
}

export function deleteEmployeeLeave(id) {
  return request({
    url: `${apiUrl}/${id}`,
    method: 'delete'
  })
} 